//
//  SMMessageViewTableCell.m
//  Jusper
//
//  Created by Cristian Gonzalez Figueroa on 20-07-13.
//  Copyright (c) 2013 Cristian Gonzalez Figueroa. All rights reserved.
//

#import "SMMessageViewTableCell.h"

@implementation SMMessageViewTableCell

@synthesize senderAndTimeLabel, messageContentView, bgImageView, ticketImageView, imageViewSentReceived, btnVer, btnReenviar, aiViewActivity, ticketImageViewReadRead, idPrivateChat;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        /*
         senderAndTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(200, 0, 300, 20)];
         //senderAndTimeLabel.textAlignment = UITextAlignmentCenter;
         senderAndTimeLabel.font = [UIFont systemFontOfSize:9.0];
         senderAndTimeLabel.textColor = [UIColor lightGrayColor];
         [self.contentView addSubview:senderAndTimeLabel];
         */
        
        idPrivateChat = [[UILabel alloc] initWithFrame:CGRectMake(200, 0, 5, 5)];
        idPrivateChat.font = [UIFont systemFontOfSize:9.0];
        idPrivateChat.textColor = [UIColor clearColor];
        [self.contentView addSubview:idPrivateChat];
        
        bgImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:bgImageView];
        
        messageContentView = [[UITextView alloc] init];
        messageContentView.backgroundColor = [UIColor clearColor];
        messageContentView.editable = NO;
        messageContentView.scrollEnabled = NO;
        
        messageContentView.editable = NO;
        //       messageContentView.dataDetectorTypes = UIDataDetectorTypeLink;
        //       messageContentView.dataDetectorTypes = UIDataDetectorTypeAddress;
        //       messageContentView.dataDetectorTypes = UIDataDetectorTypeAll;
        messageContentView.selectable = YES;
        
        [messageContentView sizeToFit];
        [self.contentView addSubview:messageContentView];
        
        imageViewSentReceived = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:imageViewSentReceived];
        
        ticketImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:ticketImageView];
        
        btnVer = [[UIButton alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:btnVer];
        
        btnReenviar = [[UIButton alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:btnReenviar];
        
        aiViewActivity = [[UIActivityIndicatorView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:aiViewActivity];
        
        ticketImageViewReadRead = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:ticketImageViewReadRead];
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end